package design_pattern.adapter.demo02;

import design_pattern.adapter.demo02.foreign.ForeignCenter;
import design_pattern.adapter.demo02.foreign.Translator;

/**
 * @version 1.0.0
 * Created by cyd on 2022-06-06 10:37:33
 * @ClassName : design_pattern.adapter.demo02.Example03
 * @Description : 类描述
 */
public class Main {
    public static void main(String[] args) {
        Forward forward = new Forward("巴蒂尔");
        forward.attack();

        Guards guards = new Guards("麦克格雷迪");
        guards.attack();

        ForeignCenter center = new ForeignCenter("姚明");
        // center.进攻(); 外籍球员只认识中文，但是教练不会，所以只能请翻译
        Translator translator = new Translator("翻译");
        translator.setForeignCenter(center);
        translator.attack();
    }
}
